package com.kevin.proxy;

import java.lang.reflect.Proxy;

public class RpcClientProxy {



    public <T>T clientProxy(Class<T> interfaces,String serviceIp, int servicePort){
        return (T) Proxy.newProxyInstance(interfaces.getClassLoader(),
                new Class[]{interfaces}, new RpcInvocationHandler(serviceIp,servicePort));
    }

}
